<extend name="Public:innerbase" />
<block name="css">
<link href="{:RES}/css/ss.css" rel="stylesheet" type="text/css"  />
<link href="{:RES}/css/style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="{:RES}/css/cymain.css" />
<link rel="stylesheet" type="text/css" href="{:STATICS}/css/default_user_com.css" media="all">
</block>

<block name="js">
<link rel="stylesheet" href="{:STATICS}/kindeditor/themes/default/default.css" />
<link rel="stylesheet" href="{:STATICS}/kindeditor/plugins/code/prettify.css" />
<script src="{:STATICS}/kindeditor/kindeditor.js" type="text/javascript"></script>
<script src="{:STATICS}/kindeditor/lang/zh_CN.js" type="text/javascript"></script>
<script src="{:STATICS}/kindeditor/plugins/code/prettify.js" type="text/javascript"></script>
<script src="{:STATICS}/js/upyun.js"></script>
<script>
			KindEditor.ready(function(K) {
				var editor = K.editor({
					allowFileManager : true
				});
				K('#image1').click(function() {
					editor.loadPlugin('image', function() {
						editor.plugin.imageDialog({
							imageUrl : K('#type1').val(),
							clickFn : function(url, title, width, height, border, align) {
								K('#type1').val(url);
								editor.hideDialog();
							}
						});
					});
				});
				K('#image2').click(function() {
					editor.loadPlugin('image', function() {
						editor.plugin.imageDialog({
							imageUrl : K('#type2').val(),
							clickFn : function(url, title, width, height, border, align) {
								K('#type2').val(url);
								editor.hideDialog();
							}
						});
					});
				});
				K('#image3').click(function() {
					editor.loadPlugin('image', function() {
						editor.plugin.imageDialog({
							imageUrl : K('#type3').val(),
							clickFn : function(url, title, width, height, border, align) {
								K('#type3').val(url);
								editor.hideDialog();
							}
						});
					});
				});
				K('#image4').click(function() {
					editor.loadPlugin('image', function() {
						editor.plugin.imageDialog({
							imageUrl : K('#type4').val(),
							clickFn : function(url, title, width, height, border, align) {
								K('#type4').val(url);
								editor.hideDialog();
							}
						});
					});
				});
				K('#insertfile').click(function() {
					editor.loadPlugin('insertfile', function() {
						editor.plugin.fileDialog({
							fileUrl : K('#url4').val(),
							clickFn : function(url, title) {
								K('#url4').val(url);
								editor.hideDialog();
							}
						});
					});
				});
			});
		</script>

<script>

var editor;
KindEditor.ready(function(K) {
editor = K.create('#description', {
resizeType : 1,
allowPreviewEmoticons : false,
allowImageUpload : true,
uploadJson : '/index.php?g=User&m=Upyun&a=kindedtiropic',
items : [
'source','undo','plainpaste','wordpaste','clearhtml','quickformat','selectall','fullscreen','fontname', 'fontsize','subscript','superscript','indent','outdent','|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline','hr']
});
});
</script>
</block>

<block name="content">
<include file="Public:upload" />
 <div class="content"  >

<div class="cLineB">

<div class="tab">
<ul>
<li class="<if condition="ACTION_NAME EQ 'index'">current</if> tabli" id="tab0"><a href="{:U('Lvyou/index',array('token'=>$token))}">旅游区简介</a></li>
<li class="<if condition="ACTION_NAME EQ 'son' ">current</if> tabli" id="tab2"><a href="{:U('Lvyou/son',array('token'=>$token))}">景区</a></li>
<li class="<if condition="ACTION_NAME EQ 'housetype' ">current</if> tabli" id="tab2"><a href="{:U('Lvyou/housetype',array('token'=>$token))}">景点</a></li>
<li class="<if condition="ACTION_NAME EQ 'album' or ACTION_NAME EQ 'album_add'">current</if> tabli" id="tab5"><a href="{:U('Lvyou/album',array('token'=>$token))}">风景相册</a></li>
<li class="<if condition="ACTION_NAME EQ 'expert'">current</if> tabli" id="tab5"><a href="{:U('Lvyou/expert',array('token'=>$token))}">游客点评</a></li>
<li class="<if condition="ACTION_NAME EQ 'lvyouindex'">current</if> tabli" id="tab6"><a href="{:U('lvyou/reservation',array('token'=>$token))}">预约管理</a></li>
</ul>
</div>
  <h4 style="padding-top:10px;">添加景点 </h4>
 </div>
 <!--tab start-->

<!--tab end-->        
    <div class="msgWrap bgfc" style="margin-top:10px;">
	  <form class="form" method="post" action="" enctype="multipart/form-data">
	  
		<table class="userinfoArea" style=" margin:0;" border="0" cellspacing="0" cellpadding="0" width="100%">
			<tbody>
				<tr>
					<th width="120">景点名称：</th>
					<input type="hidden" name="thetype" value="Lvyou">
					<td> <input type="text" id="name" name="name" value="{$housetype['name']}" class="input-large px" data-rule-required="true" data-rule-maxlength="20">
                                        <span class="maroon">*</span>
                                        <span class="help-inline">尽量简单，不要超过20字</span></td>
				</tr>
			   <tr>
					<th>所属景区：</th>
					<td><select id="son_id" name="son_id" class="input-medium" data-rule-required="true">
                                         
                                            <option value="0">请选择景区</option>
                                         
                                            <volist name="son_data" id="vo">
                                            <option value="{$vo['sid']}" <if condition="$vo['sid'] eq $housetype['son_id']">selected="selected"</if>>{$vo['title']}</option>
                                            </volist>
                                        </select></td>
				</tr>
                 <tr>
                    <th>选择全景相册：</th>
                    <td>
                        <select id="panorama_id" name="panorama_id" class="input-medium" data-rule-required="true"> 
                                          <option value="0">请选择360全景相册</option> 
                                            <volist name="panorama" id="vo">
                                               <option value="{$vo['pid']}" <if condition="$vo['pid'] eq $housetype['panorama_id']">selected="selected"</if>>{$vo['name']}</option>
                                            </volist>
                                        </select>
                                        <span class="maroon">*</span>
                                        <span class="help-inline">如果没有，请先到 <a href="{:U('Panorama/add',array('token'=>$token))}" class="btn"><strong><font color='red'>360°全景</strong></font></a>添加</span>
                    </td>
                </tr>
				<tr>
					<th width="120">简要描述：</th>
					<td> <input type="text" id="floor_num" name="floor_num" value="{$housetype['floor_num']}" class="input-large px" data-rule-required="true">
                                        <span class="maroon">*</span>
                                        <span class="help-inline">如：1-10</span></td>
				</tr>
				<tr>
					<th width="120">景点描述：</th>
					<td> <input type="text" id="area" name="area" value="{$housetype['area']}" class="input-large px" data-rule-required="true">
                                        <span class="maroon">*</span>
                                        <span class="help-inline">如：约120平方米</span></td>
				</tr>
				<tr>
					<th width="120">显示顺序：</th>
					<td>  <input type="text" id="sort" name="sort" value="{$housetype['sort']|default=1}" class="input-mini px" data-rule-required="true" data-rule-number="true">
                                        <span class="maroon">*</span>
                                        <span class="help-inline">数值越大越靠前</span></td>
				</tr>
				<tr>
					<th width="120">景点介绍：</th>
					<td>  <textarea id="description" name="description" class='input-xxlarge'  placeholder="介绍简单明了就好" style="width:100%;height:125px">{$housetype['description']}</textarea></td>
				</tr>
				<tr>
					<th width="120">景点图片:</th>
					<td> <div id="upimg_main">
                                        <p>
                                            <img class="thumb_img" id="type1Holder" src="{$housetype['type1']}" style="max-height:100px;">
                                            <input type="input" class="px" id="type1" value="{$housetype['type1']}" name="type1" >
                                            <span class="help-inline">
                                                 <span class="ke-button-common" id="image1" style="margin-top: 3px;margin-left: 5px;">
                  		  <div class="btn-group" style="vertical-align:bottom;">
                            <span class="btn btn-xs btn-primary" onclick="selectAsset('type1',720,400)">
                                <span class="glyphicon glyphicon-cloud-upload"></span>选择
                            </span>
                            <span class="btn btn-primary btn-xs" onclick="previewImg('type1')">
                                <span class="glyphicon glyphicon-picture"></span>预览
                            </span>
                          </div>
                                                <span class="help-inline">建议尺寸：宽720像素，高400像素</span>
                                            </span>
                                        </p>
                                            <br />
                                        <p>
                                            <img class="thumb_img" id="type2Holder" src="{$housetype['type2']}" style="max-height:100px;">
                                            <input type="input" class="px" id="type2" value="{$housetype['type2']}" name="type2" >
                                     
                                            <span class="help-inline">
                                                 <span class="ke-button-common" id="image2" style="margin-top: 3px;margin-left: 5px;">
                  		<div class="btn-group" style="vertical-align:bottom;">
                            <span class="btn btn-xs btn-primary" onclick="selectAsset('type2',720,400)">
                                <span class="glyphicon glyphicon-cloud-upload"></span>选择
                            </span>
                            <span class="btn btn-primary btn-xs" onclick="previewImg('type2')">
                                <span class="glyphicon glyphicon-picture"></span>预览
                            </span>
                        </div>
                                                <span class="help-inline">建议尺寸：宽720像素，高400像素</span>
                                            </span>
                                        </p>
                                            <br />
                                        <p>
                                            <img class="thumb_img" id="type3Holder" src="{$housetype['type3']}" style="max-height:100px;">
                                            <input type="input" class="px" id="type3" value="{$housetype['type3']}" name="type3" >
                                     
                                            <span class="help-inline">
                                                 <span class="ke-button-common" id="image3" style="margin-top: 3px;margin-left: 5px;">
                  		<div class="btn-group" style="vertical-align:bottom;">
                            <span class="btn btn-xs btn-primary" onclick="selectAsset('type3',720,400)">
                                <span class="glyphicon glyphicon-cloud-upload"></span>选择
                            </span>
                            <span class="btn btn-primary btn-xs" onclick="previewImg('type3')">
                                <span class="glyphicon glyphicon-picture"></span>预览
                            </span>
                        </div>
                                                <span class="help-inline">建议尺寸：宽720像素，高400像素</span>
                                            </span>
                                        </p>
                                                <br />
                                        <p>
                                            <img class="thumb_img" id="type4Holder" src="{$housetype['type4']}" style="max-height:100px;">
                                            <input type="input" class="px"  id="type4" value="{$housetype['type4']}" name="type4" >
                                     
                                            <span class="help-inline">
                                                 <span class="ke-button-common" id="image4" style="margin-top: 3px;margin-left: 5px;">
                  		<div class="btn-group" style="vertical-align:bottom;">
                            <span class="btn btn-xs btn-primary" onclick="selectAsset('type4',720,400)">
                                <span class="glyphicon glyphicon-cloud-upload"></span>选择
                            </span>
                            <span class="btn btn-primary btn-xs" onclick="previewImg('type4')">
                                <span class="glyphicon glyphicon-picture"></span>预览
                            </span>
                        </div>
                                                <span class="help-inline">建议尺寸：宽720像素，高400像素</span>
                                            </span>
                                        </p>

                                        </div></td>
				</tr>
			                                <if condition="$housetype['id'] neq ''">
                                    <input type="hidden" name="id" value="{$housetype['id']}" />
                                    </if>
				<th>&nbsp;</th>
					<td>
					<input type="hidden" name="token" value="{$token}" />
						<button type="submit" name="button" class="btnGreen">保存</button>
						<a href="javascript:history.go(-1);" class="btnGray vm">取消</a>
					</td>
				</tr>
			</tbody>
		</table>
	</form>
  </div>
        </div>
<include file="Public:footer"/>

</block>